Skip to content

dai: uaol: add support for Intel UAOL#10567

Open
serhiy-katsyuba-intel wants to merge 2 commits intothesofproject:mainfrom
serhiy-katsyuba-intel:uaol
Open

dai: uaol: add support for Intel UAOL#10567
serhiy-katsyuba-intel wants to merge 2 commits intothesofproject:mainfrom
serhiy-katsyuba-intel:uaol

Conversation

@serhiy-katsyuba-intel
Copy link
Contributor

@serhiy-katsyuba-intel serhiy-katsyuba-intel commented Feb 20, 2026

Adds support for Intel USB Audio Offload Link (UAOL) DAI.

This is a revival of the old closed UAOL PR #9227.

Zephyr PR zephyrproject-rtos/zephyr#104137 is now merged.

@serhiy-katsyuba-intel
Copy link
Contributor Author

SOFCI TEST

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

serhiy-katsyuba-intel and others added 2 commits March 5, 2026 17:14
Updates Zephyr to bring in UAOL support.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Adds support for Intel USB Audio Offload Link (UAOL) DAI.

Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Copilot AI review requested due to automatic review settings March 5, 2026 16:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Intel USB Audio Offload Link (UAOL) DAI support across the SOF/Zephyr integration and IPC4 paths, including capability reporting and node-id mapping.

Changes:

  • Update West manifest to a Zephyr revision that includes UAOL-related support.
  • Introduce the SOF_DAI_INTEL_UAOL type and wire it through DAI selection/config paths.
  • Add UAOL capability advertisement and UAOL stream-id → HDA link stream-id mapping for IPC4 DMA control.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
west.yml Bumps Zephyr revision required for UAOL enablement.
src/lib/dai.c Registers UAOL devices and maps UAOL to the Zephyr DAI type / DMA caps.
src/ipc/ipc4/dai.c Adds UAOL handling for link config and DMA channel selection.
src/include/ipc/dai.h Introduces SOF_DAI_INTEL_UAOL enum value.
src/audio/dai-zephyr.c Adds UAOL case to Zephyr DAI configuration.
src/audio/copier/copier_dai.c Adds UAOL stream link classes to DAI creation path.
src/audio/copier/copier.c Routes UAOL stream link classes to copier_dai_create().
src/audio/base_fw_intel.c Advertises UAOL support/caps and maps UAOL node indices for DMA control.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +325 to +333
case ipc4_alh_uaol_stream_link_output_class:
case ipc4_alh_uaol_stream_link_input_class:
dai.type = SOF_DAI_INTEL_UAOL;
dai.is_config_blob = true;
cd->gtw_type = ipc4_gtw_alh;
ret = ipc4_find_dma_config(&dai, gtw_cfg_data, gtw_cfg_szie);
if (ret != IPC4_SUCCESS) {
comp_err(dev, "No uaol dma_config found in blob!");
return -EINVAL;
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gtw_cfg_szie is very likely a misspelled identifier (expected something like gtw_cfg_size). As written, this will fail to compile unless that exact symbol exists. Rename it to the correct size variable used for the gateway config blob length.

Copilot uses AI. Check for mistakes.
const size_t dev_count = ARRAY_SIZE(uaol_devs);
struct uaol_capabilities dev_cap;
struct ipc4_uaol_capabilities *caps = (struct ipc4_uaol_capabilities *)tuple->value;
size_t caps_size = offsetof(struct ipc4_uaol_capabilities, link_caps[dev_count]);
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

offsetof(struct ..., link_caps[dev_count]) uses a non-constant array index; this is not valid with standard offsetof/__builtin_offsetof and can fail to compile. Compute the size as sizeof(*caps) + dev_count * sizeof(caps->link_caps[0]) (or the equivalent using the element type) instead.

Suggested change
size_t caps_size = offsetof(struct ipc4_uaol_capabilities, link_caps[dev_count]);
size_t caps_size = sizeof(*caps) + dev_count * sizeof(caps->link_caps[0]);

Copilot uses AI. Check for mistakes.
Comment on lines +63 to +68
case SOF_DAI_INTEL_UAOL:
link_cfg.full = 0;
link_cfg.part.hchan = gtw_fmt->channels_count - 1;
link_cfg.part.dir = common_config->direction;
link_cfg.part.stream = common_config->host_dma_config[0]->stream_id;
break;
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hchan is derived as channels_count - 1. If channels_count is 0, this underflows and encodes an invalid hchan value. Clamp or validate the channel count before subtracting (e.g., ensure the minimum encoded value is 0 and only subtract when channels_count > 0).

Copilot uses AI. Check for mistakes.
@lgirdwood
Copy link
Member

@serhiy-katsyuba-intel I assuming CI will test this now ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants